
#ifndef TSTRING_H
#define TSTRING_H
#include <iostream>
using std::ostream;
using std::istream;

class TString{
    private:
        char *str;
        int len;
        static int num_strings;
    public:
        static const int CINLIM=80;
        TString();

        TString (const char *s);
        TString(const TString &);
        ~TString();
        int length() const {return len;}
        TString & operator=(const TString &);
        TString & operator=(const char *);
        char & operator[](int i);
        const char & operator[](int i) const;

        friend bool operator<(const TString &st, const TString &st2);
        friend bool operator >(const TString &st1, const TString &st2);
        friend bool operator==(const TString &st, const TString &st2);
        friend ostream & operator<<(ostream & os, const TString &st);
        friend istream & operator>>(istream & is, TString &st);
        static int HowMany();
};
#endif
